package com.kaily.timemanager.activity;

import android.view.View;

import com.app.common.activity.BaseActivity;
import com.kaily.timemanager.R;
import com.kaily.timemanager.obj.TitleInfo;
import com.kaily.timemanager.view.TitleLayout;

import butterknife.ButterKnife;

/**
 * Created by zhoulikai on 17/2/16.
 * 针对本项目中的配置的初始化
 */

public abstract class AppBaseActivity extends BaseActivity {


    private TitleLayout titleLayout;

    @Override
    public void initAppConfigure() {

    }

    @Override
    public boolean isOpenTranslucentStatus() {
        return true;
    }

    @Override
    public void initPage() {
        ButterKnife.inject(this);
        View titleLayout = this.findViewById(R.id.title_layout);
        if (titleLayout != null && titleLayout instanceof TitleLayout) {
            this.titleLayout = (TitleLayout) titleLayout;
            this.titleLayout.setTitleInfo(getTitleInfo());
        }
    }

    public abstract TitleInfo getTitleInfo();

    @Override
    public int getAppSystemBarColor() {
        return R.color.systemBarColor;
    }
}
